pow.ivyclient
Class MsgFilter

java.lang.Object
  extended by pow.ivyclient.MsgFilter

public class MsgFilter
extends java.lang.Object

this class filters the message, thanks to their hash code it is used because Paparazzi send periodic messages that are often the same so we filter them to lighten the server load and the bandwidth of the udp channel

Author:
genin

Constructor Summary
MsgFilter()
          create a message filter
 
Method Summary
 boolean isNew(java.lang.String msg)
          inform whether the message is new or not
 void resetfilter()
          empty the filter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgFilter

public MsgFilter()
create a message filter

Method Detail

isNew

public boolean isNew(java.lang.String msg)
inform whether the message is new or not

Parameters:
msg -
Returns:
true if the message is a new one and was added to the filter

resetfilter

public void resetfilter()
empty the filter